# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-latex
pkgver=3.38.0
pkgrel=1
pkgdesc="LaTeX editor for the GNOME desktop"
url="https://wiki.gnome.org/Apps/GNOME-LaTeX"
# s390x, ppc64le and riscv64 blocked by texlive
arch="all !ppc64le !s390x !riscv64"
license="GPL-3.0-or-later"
depends="texlive"
makedepends="glib-dev intltool itstool vala yelp gobject-introspection-dev
	gsettings-desktop-schemas-dev gspell-dev gtk+3.0-dev libgee-dev
	gtksourceview4-dev tepl-dev dconf-dev autoconf automake libtool gtk-doc
	"
options="!check" # appdata doesn't pass
subpackages="$pkgname-doc $pkgname-lang"
source="https://download.gnome.org/sources/gnome-latex/${pkgver%.*}/gnome-latex-$pkgver.tar.xz
    e1b01186f8a4e5d3fee4c9ccfbedd6d098517df9.patch "

prepare() {
    default_prepare
    autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="c42cc1ff2c59afe4d995e9f13d9a858e2297827d5f9359cecd969d305224fc4b4d0306e0ab6aa1d9b7fc92acc25e597319299afe176cff1903f734fbc2ddf29b  gnome-latex-3.38.0.tar.xz
34218ac3cf11393801e3848d42b4143d61a273a7aa50ea82eef116076dc6b916cbac6cd1c40bbe5e8863eba0f899217bdb2525de9bb146a0ac7e0cdde4a96e7d  e1b01186f8a4e5d3fee4c9ccfbedd6d098517df9.patch"
